/**
 * 
 */
package biz.innovasoft.nodb.transaction;

import java.util.Date;

import org.prevayler.Prevayler;
import org.prevayler.Query;

import biz.innovasoft.nodb.impl.GenericRepository;

/**
 * @author diego
 *
 */
public abstract class BaseQuery implements Query {

	protected Prevayler prevayler;
	
	public BaseQuery (Prevayler prevayler) {
		this.prevayler = prevayler;
	}
	
	@Override
	public Object query(Object prevalentSystem, Date executionTime)
			throws Exception {
		return query ((GenericRepository)prevalentSystem, executionTime);
	}
	
	public abstract Object query (GenericRepository repository, Date executionTime) throws Exception;

}
